﻿using System.ComponentModel.DataAnnotations;

namespace Book_WebAPI.Models
{
    public class AuthorCreate
    {
        public int id { get; set; }
        [Required(ErrorMessage = "必须填写姓名")]
        [MaxLength(25, ErrorMessage ="姓名的最大长度不超过25个字符")]
        public string name { get; set; }
        public int age { get; set; }
        [EmailAddress(ErrorMessage = "邮箱格式不正确")]
        public string email { get; set; }
    }
}
